home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-16 | 25.5 KB | 580 lines | [TEXT/CCL2] |
- (in-package :TRAPS) ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OPEN SCRIPTING ARCHITECTURE: Client Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Copyright 1992 Apple Computer, Inc. All rights reserved.
- ; // Authors: Jens Alfke, William Cook, Donn Denman, and Warren Harris
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // This interface defines what it means to be a "scripting component."
- ; // Scripting components allow "scripts" to be loaded and executed. This
- ; // interface does not define the way in which a particular scripting
- ; // component's scripts are editing and debugged.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
- ; $IFC UNDEFINED UsingIncludes
- ; $SETC UsingIncludes := 0
- ; $ENDC
-
- ; $IFC NOT UsingIncludes
-
- ; $ENDC
-
- ; $IFC UNDEFINED UsingOSA
- ; $SETC UsingOSA := 1
-
- ; $I+
- ; $SETC OSAIncludes := UsingIncludes
- ; $SETC UsingIncludes := 1
- ; $IFC UNDEFINED UsingAppleEvents
-
- (require-interface 'APPLEEVENTS); $I $$Shell(PInterfaces)AppleEvents.p
- ; $ENDC
- ; $IFC UNDEFINED UsingComponents
-
- (require-interface 'COMPONENTS) ; $I $$Shell(PInterfaces)Components.p
- ; $ENDC
- ; $SETC UsingIncludes := OSAIncludes
-
- ; Types and Constants
-
- (defconstant $kOSAComponentType :|osa |)
- (defconstant $kOSAGenericScriptingComponentSubtype :|scpt|)
-
- (def-mactype :OSAID (find-mactype :SIGNED-LONG))
- (def-mactype :OSAERROR (find-mactype :SIGNED-LONG))
-
- (defconstant $kOSANullScript 0)
-
- (defconstant $kOSAScriptResourceType #$KOSAGENERICSCRIPTINGCOMPONENTSUBTYPE)
- (defconstant $typeOSAGenericStorage #$KOSASCRIPTRESOURCETYPE)
-
- ; Error Codes
- (defconstant $errOSACorruptData -1702); Same as errAECorruptData
- (defconstant $errOSASystemError -1750)
- (defconstant $errOSAInvalidID -1751)
- (defconstant $errOSABadStorageType -1752)
- (defconstant $errOSAScriptError -1753)
- (defconstant $errOSABadSelector -1754)
- (defconstant $errOSAInvalidAccess -1755)
- (defconstant $errOSARecordingIsAlreadyOn -30009)
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Interface Descriptions
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // The OSA Interface is broken down into a required interface, and several
- ; // optional interfaces to support additional functionality. A given
- ; scripting
- ; // component may choose to support only some of the optional interfaces in
- ; // addition to the basic interface. The OSA Component Flags may be used to
- ;
- ; // query the Component Manager to find a scripting component with a
- ; particular
- ; // capability, or determine if a particular scripting component supports a
- ; // particular capability.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
- ; OSA Component Flags
- (defconstant $kOSASupportsCompiling 1)
- (defconstant $kOSASupportsGetSource 2)
- (defconstant $kOSASupportsAECoercion 4)
- (defconstant $kOSASupportsAESending 8)
- (defconstant $kOSASupportsRecording 16)
- (defconstant $kOSASupportsWindowEditing 32)
- (defconstant $kOSASupportsDialects 64)
- (defconstant $kOSASupportsTinkering 128)
-
- ; Component Selectors
- ; Basic Scripting:
- (defconstant $kOSASelectLoad #X1)
- (defconstant $kOSASelectStore #X2)
- (defconstant $kOSASelectExecute #X3)
- (defconstant $kOSASelectDisplay #X4)
- (defconstant $kOSASelectScriptError #X5)
- (defconstant $kOSASelectDispose #X6)
- (defconstant $kOSASelectSetScriptInfo #X7)
- (defconstant $kOSASelectGetScriptInfo #X8)
- (defconstant $kOSASelectSetActiveProc #X9)
- (defconstant $kOSASelectGetActiveProc #XA)
- ; Compiling:
- (defconstant $kOSASelectExactScriptingComponent #X101)
- (defconstant $kOSASelectScriptingComponentName #X102)
- (defconstant $kOSASelectCompile #X103)
- (defconstant $kOSASelectCopyID #X104)
- ; GetSource:
- (defconstant $kOSASelectGetSource #X201)
- ; AECoercion:
- (defconstant $kOSASelectCoerceFromDesc #X301)
- (defconstant $kOSASelectCoerceToDesc #X302)
- ; AESending:
- (defconstant $kOSASelectSetSendProc #X401)
- (defconstant $kOSASelectGetSendProc #X402)
- (defconstant $kOSASelectSetCreateProc #X403)
- (defconstant $kOSASelectGetCreateProc #X404)
- ; Recording:
- (defconstant $kOSASelectStartRecording #X501)
- (defconstant $kOSASelectStopRecording #X502)
- ; WindowEditing:
- ; kOSASelectOpenEditor = $0601;
- ; kOSASelectCloseEditor = $0602;
- ; { Dialects:
- (defconstant $kOSASelectSetCurrentDialect #X701)
- (defconstant $kOSASelectGetCurrentDialect #X702)
- (defconstant $kOSASelectAvailableDialects #X703)
- ; Tinkering:
- (defconstant $kOSASelectExecuteEvent #X801)
- (defconstant $kOSASelectMakeContext #X802)
-
- (defconstant $kOSASelectComponentSpecificStart #X1001)
- ; scripting component specific selectors are added beginning with this
- ; value
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Basic Scripting Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Scripting components must at least support the Basic Scripting
- ; interface.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
- ; Loading and Storing Scripts
-
-
- (deftrap _OSALOAD ((SCRIPTINGCOMPONENT (:POINTER :COMPONENTINSTANCERECORD))
- (SCRIPTDATA :AEDESC) (RESULTINGSCRIPTID (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTDATA RESULTINGSCRIPTID
- ((+ (ASH 8 16) 1) :SIGNED-LONGINT)))
-
-
- (deftrap _OSASTORE ((SCRIPTINGCOMPONENT (:POINTER :COMPONENTINSTANCERECORD))
- (SCRIPTID :SIGNED-LONG) (DESIREDTYPE :OSTYPE) (RESULTINGSCRIPTDATA (:POINTER
- :AEDESC)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTID DESIREDTYPE
- RESULTINGSCRIPTDATA ((+ (ASH 12 16) 2) :SIGNED-LONGINT)))
-
- ; Executing Scripts
-
-
- (deftrap _OSAEXECUTE ((SCRIPTINGCOMPONENT (:POINTER :COMPONENTINSTANCERECORD))
- (COMPILEDSCRIPTID :SIGNED-LONG) (CONTEXTID :SIGNED-LONG) (MODEFLAGS
- :SIGNED-LONG) (RESULTINGSCRIPTVALUEID (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT COMPILEDSCRIPTID CONTEXTID
- MODEFLAGS RESULTINGSCRIPTVALUEID ((+ (ASH 16 16) 3) :SIGNED-LONGINT)))
-
- ; Displaying Results
-
-
- (deftrap _OSADISPLAY ((SCRIPTINGCOMPONENT (:POINTER :COMPONENTINSTANCERECORD))
- (SCRIPTVALUEID :SIGNED-LONG) (DESIREDTYPE :OSTYPE) (MODEFLAGS :SIGNED-LONG)
- (RESULTINGTEXT (:POINTER :AEDESC)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTVALUEID DESIREDTYPE
- MODEFLAGS RESULTINGTEXT ((+ (ASH 16 16) 4) :SIGNED-LONGINT)))
-
- ; Getting Error Information
-
-
- (deftrap _OSASCRIPTERROR ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (SELECTOR :OSTYPE) (DESIREDTYPE :OSTYPE)
- (RESULTINGERRORDESCRIPTION (:POINTER :AEDESC)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SELECTOR DESIREDTYPE
- RESULTINGERRORDESCRIPTION ((+ (ASH 12 16) 5) :SIGNED-LONGINT)))
-
- ; OSAScriptError selectors:
- (defconstant $kOSAErrorNumber :|errn|)
- (defconstant $kOSAErrorMessage :|errs|)
- (defconstant $kOSAErrorBriefMessage :|errb|)
- (defconstant $kOSAErrorApp :|erap|)
- (defconstant $kOSAErrorPartialResult :|ptlr|)
- (defconstant $kOSAErrorOffendingObject :|erob|)
- (defconstant $kOSAErrorRange :|erng|)
-
- ; text ranges:
- (defconstant $typeOSAErrorRange :|erng|)
- (defconstant $keySourceStart :|srcs|)
- (defconstant $keySourceEnd :|srce|)
-
- ; Disposing Script IDs
-
-
- (deftrap _OSADISPOSE ((SCRIPTINGCOMPONENT (:POINTER :COMPONENTINSTANCERECORD))
- (SCRIPTID :SIGNED-LONG))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTID ((+ (ASH 4 16) 6)
- :SIGNED-LONGINT)))
-
- ; Getting and Setting Script Information
-
-
- (deftrap _OSASETSCRIPTINFO ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (SCRIPTID :SIGNED-LONG) (SELECTOR :OSTYPE) (VALUE
- :SIGNED-LONG))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTID SELECTOR VALUE ((+
- (ASH 12 16) 7) :SIGNED-LONGINT)))
-
-
- (deftrap _OSAGETSCRIPTINFO ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (SCRIPTID :SIGNED-LONG) (SELECTOR :OSTYPE) (RESULT
- (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTID SELECTOR RESULT ((+
- (ASH 12 16) 8) :SIGNED-LONGINT)))
-
- ; selectors
- (defconstant $kOSAScriptIsModified :|modi|)
- (defconstant $kOSAScriptIsBeingEdited :|edit|)
- (defconstant $kOSAScriptIsBeingRecorded :|recd|)
- (defconstant $kOSAScriptIsTypeCompiledScript :|cscr|)
- (defconstant $kOSAScriptIsTypeScriptValue :|valu|)
- (defconstant $kOSAScriptIsTypeScriptContext :|cntx|)
- (defconstant $kOSAScriptBestType :|best|)
-
- ; Manipulating the ActiveProc
-
- (def-mactype :OSAACTIVEPROCPTR (find-mactype :POINTER))
-
-
- (deftrap _OSASETACTIVEPROC ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (ACTIVEPROC :POINTER) (REFCON :SIGNED-LONG))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT ACTIVEPROC REFCON ((+ (ASH 8
- 16) 9) :SIGNED-LONGINT)))
-
-
- (deftrap _OSAGETACTIVEPROC ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (ACTIVEPROC (:POINTER :POINTER)) (REFCON (:POINTER
- :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT ACTIVEPROC REFCON ((+ (ASH 8
- 16) 10) :SIGNED-LONGINT)))
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Optional Compiling Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Scripting components that support the Compiling interface have the
- ; // kOSASupportsCompiling bit set in it's ComponentDescription.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
-
- (deftrap _OSAEXACTSCRIPTINGCOMPONENT ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (SCRIPTID :SIGNED-LONG) (EXACTSCRIPTINGCOMPONENT
- (:POINTER (:POINTER :COMPONENTINSTANCERECORD))))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTID
- EXACTSCRIPTINGCOMPONENT ((+ (ASH 8 16) 257) :SIGNED-LONGINT)))
-
-
- (deftrap _OSASCRIPTINGCOMPONENTNAME ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (RESULTINGSCRIPTINGCOMPONENTNAME (:POINTER
- :AEDESC)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT RESULTINGSCRIPTINGCOMPONENTNAME
- ((+ (ASH 4 16) 258) :SIGNED-LONGINT)))
-
-
- (deftrap _OSACOMPILE ((SCRIPTINGCOMPONENT (:POINTER :COMPONENTINSTANCERECORD))
- (SOURCEDATA :AEDESC) (MODEFLAGS :SIGNED-LONG) (RESULTINGCOMPILEDSCRIPTID
- (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SOURCEDATA MODEFLAGS
- RESULTINGCOMPILEDSCRIPTID ((+ (ASH 12 16) 259) :SIGNED-LONGINT)))
-
-
- (deftrap _OSACOPYID ((SCRIPTINGCOMPONENT (:POINTER :COMPONENTINSTANCERECORD))
- (FROMID :SIGNED-LONG) (TOID (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT FROMID TOID ((+ (ASH 8 16) 260)
- :SIGNED-LONGINT)))
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Optional GetSource Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Scripting components that support the GetSource interface have the
- ; // kOSASupportsGetSource bit set in it's ComponentDescription.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
-
- (deftrap _OSAGETSOURCE ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (SCRIPTID :SIGNED-LONG) (DESIREDTYPE :OSTYPE)
- (RESULTINGSOURCEDATA (:POINTER :AEDESC)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTID DESIREDTYPE
- RESULTINGSOURCEDATA ((+ (ASH 12 16) 513) :SIGNED-LONGINT)))
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Optional AECoercion Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Scripting components that support the AECoercion interface have the
- ; // kOSASupportsGetSource bit set in it's ComponentDescription.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
-
- (deftrap _OSACOERCEFROMDESC ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (SCRIPTDATA :AEDESC) (RESULTINGSCRIPTVALUEID
- (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTDATA
- RESULTINGSCRIPTVALUEID ((+ (ASH 8 16) 769) :SIGNED-LONGINT)))
-
-
- (deftrap _OSACOERCETODESC ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (SCRIPTVALUEID :SIGNED-LONG) (DESIREDTYPE :OSTYPE)
- (RESULT (:POINTER :AEDESC)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SCRIPTVALUEID DESIREDTYPE
- RESULT ((+ (ASH 12 16) 770) :SIGNED-LONGINT)))
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Optional AESending Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Scripting components that support the AESending interface have the
- ; // kOSASupportsAESending bit set in it's ComponentDescription.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
- (def-mactype :AESENDPROCPTR (find-mactype :POINTER))
- (def-mactype :AECREATEAPPLEEVENTPROCPTR (find-mactype :POINTER))
-
- ; The first two proc pointers have the following interfaces
- ; taken from AppleEvents.p
- ;
- ; FUNCTION AECreateAppleEvent(theAEEventClass: AEEventClass;
- ; theAEEventID: AEEventID;
- ; target: AEAddressDesc;
- ; returnID: INTEGER;
- ; transactionID: LONGINT;
- ; VAR result: AppleEvent): OSErr;
- ;
- ; FUNCTION AESend(theAppleEvent: AppleEvent;
- ; VAR reply: AppleEvent;
- ; sendMode: AESendMode;
- ; sendPriority: AESendPriority;
- ; timeOutInTicks: LONGINT;
- ; idleProc: IdleProcPtr;
- ; filterProc: EventFilterProcPtr): OSErr;
- ;
- ; FUNCTION OSAActive(): OSErr;
- ;
- ;
-
-
- (deftrap _OSASETSENDPROC ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (SENDPROC :POINTER) (REFCON :SIGNED-LONG))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SENDPROC REFCON ((+ (ASH 8 16)
- 1025) :SIGNED-LONGINT)))
-
-
- (deftrap _OSAGETSENDPROC ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (SENDPROC (:POINTER :POINTER)) (REFCON (:POINTER
- :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT SENDPROC REFCON ((+ (ASH 8 16)
- 1026) :SIGNED-LONGINT)))
-
-
- (deftrap _OSASETCREATEPROC ((SCRIPTSYSTEM (:POINTER :COMPONENTINSTANCERECORD))
- (CREATEPROC :POINTER) (REFCON :SIGNED-LONG))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTSYSTEM CREATEPROC REFCON ((+ (ASH 8 16)
- 1027) :SIGNED-LONGINT)))
-
-
- (deftrap _OSAGETCREATEPROC ((SCRIPTSYSTEM (:POINTER :COMPONENTINSTANCERECORD))
- (CREATEPROC (:POINTER :POINTER)) (REFCON (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTSYSTEM CREATEPROC REFCON ((+ (ASH 8 16)
- 1028) :SIGNED-LONGINT)))
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Optional Recording Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Scripting components that support the Recording interface have the
- ; // kOSASupportsRecording bit set in it's ComponentDescription.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
-
- (deftrap _OSASTARTRECORDING ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (COMPILEDSCRIPTTOMODIFYID (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT COMPILEDSCRIPTTOMODIFYID ((+
- (ASH 4 16) 1281) :SIGNED-LONGINT)))
-
-
- (deftrap _OSASTOPRECORDING ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (COMPILEDSCRIPTID :SIGNED-LONG))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT COMPILEDSCRIPTID ((+ (ASH 4 16)
- 1282) :SIGNED-LONGINT)))
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Optional WindowEditing Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Scripting components that support the WindowEditing interface have the
- ; // kOSASupportsWindowEditing bit set in it's ComponentDescription.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
-
- (deftrap _OSAOPENEDITOR ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (COMPILEDSCRIPTTOMODIFYID (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT COMPILEDSCRIPTTOMODIFYID ((+
- (ASH 4 16) 1537) :SIGNED-LONGINT)))
-
-
- (deftrap _OSACLOSEEDITOR ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (COMPILEDSCRIPTID :SIGNED-LONG))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT COMPILEDSCRIPTID ((+ (ASH 4 16)
- 1538) :SIGNED-LONGINT)))
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Optional Dialects Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Scripting components that support the Dialects interface have the
- ; // kOSASupportsDialects bit set in it's ComponentDescription.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
-
- (deftrap _OSASETCURRENTDIALECT ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (DIALECTCODE :SIGNED-INTEGER))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT DIALECTCODE ((+ (ASH 2 16)
- 1793) :SIGNED-LONGINT)))
-
-
- (deftrap _OSAGETCURRENTDIALECT ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (RESULTINGDIALECTCODE (:POINTER :SIGNED-INTEGER)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT RESULTINGDIALECTCODE ((+ (ASH 4
- 16) 1794) :SIGNED-LONGINT)))
-
-
- (deftrap _OSAAVAILABLEDIALECTS ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (RESULTINGDIALECTINFOLIST (:POINTER :AEDESC)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT RESULTINGDIALECTINFOLIST ((+
- (ASH 4 16) 1795) :SIGNED-LONGINT)))
-
- (defconstant $typeOSADialectInfo :|difo|)
- (defconstant $keyOSADialectName :|dnam|)
- (defconstant $keyOSADialectCode :|dcod|)
-
- ;
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // OSA Optional Tinkering Interface
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ; // Scripting components that support the Tinkering interface have the
- ; // kOSASupportsTinkering bit set in it's ComponentDescription.
- ; ////////////////////////////////////////////////////////////////////////////
- ; ////
- ;
-
-
- (deftrap _OSAEXECUTEEVENT ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (THEAPPLEEVENT :AEDESC) (CONTEXTID :SIGNED-LONG)
- (DEFAULTHANDLER :POINTER) (MODEFLAGS :SIGNED-LONG) (REPLY (:POINTER :AEDESC))
- (REFCON :SIGNED-LONG))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT THEAPPLEEVENT CONTEXTID
- DEFAULTHANDLER MODEFLAGS REPLY REFCON ((+ (ASH 24 16) 2049) :SIGNED-LONGINT)))
-
-
- (deftrap _OSAMAKECONTEXT ((SCRIPTINGCOMPONENT (:POINTER
- :COMPONENTINSTANCERECORD)) (CONTEXTNAME (:POINTER (:STRING 255)))
- (PARENTCONTEXT :SIGNED-LONG) (RESULTINGCONTEXTID (:POINTER :SIGNED-LONG)))
- (:STACK :SIGNED-LONG)
- (:STACK-TRAP #xA82A :D0 0 SCRIPTINGCOMPONENT CONTEXTNAME PARENTCONTEXT
- RESULTINGCONTEXTID ((+ (ASH 12 16) 2050) :SIGNED-LONGINT)))
-
- ; $ENDC ; UsingOSA
-
- ; $IFC NOT UsingIncludes
-
- ; $ENDC
-
- (export '($KEYOSADIALECTCODE $KEYOSADIALECTNAME $TYPEOSADIALECTINFO
- $KOSASCRIPTBESTTYPE $KOSASCRIPTISTYPESCRIPTCONTEXT
- $KOSASCRIPTISTYPESCRIPTVALUE $KOSASCRIPTISTYPECOMPILEDSCRIPT
- $KOSASCRIPTISBEINGRECORDED $KOSASCRIPTISBEINGEDITED
- $KOSASCRIPTISMODIFIED $KEYSOURCEEND $KEYSOURCESTART
- $TYPEOSAERRORRANGE $KOSAERRORRANGE $KOSAERROROFFENDINGOBJECT
- $KOSAERRORPARTIALRESULT $KOSAERRORAPP $KOSAERRORBRIEFMESSAGE
- $KOSAERRORMESSAGE $KOSAERRORNUMBER $KOSASELECTCOMPONENTSPECIFICSTART
- $KOSASELECTMAKECONTEXT $KOSASELECTEXECUTEEVENT
- $KOSASELECTAVAILABLEDIALECTS $KOSASELECTGETCURRENTDIALECT
- $KOSASELECTSETCURRENTDIALECT $KOSASELECTSTOPRECORDING
- $KOSASELECTSTARTRECORDING $KOSASELECTGETCREATEPROC
- $KOSASELECTSETCREATEPROC $KOSASELECTGETSENDPROC
- $KOSASELECTSETSENDPROC $KOSASELECTCOERCETODESC
- $KOSASELECTCOERCEFROMDESC $KOSASELECTGETSOURCE $KOSASELECTCOPYID
- $KOSASELECTCOMPILE $KOSASELECTSCRIPTINGCOMPONENTNAME
- $KOSASELECTEXACTSCRIPTINGCOMPONENT $KOSASELECTGETACTIVEPROC
- $KOSASELECTSETACTIVEPROC $KOSASELECTGETSCRIPTINFO
- $KOSASELECTSETSCRIPTINFO $KOSASELECTDISPOSE $KOSASELECTSCRIPTERROR
- $KOSASELECTDISPLAY $KOSASELECTEXECUTE $KOSASELECTSTORE
- $KOSASELECTLOAD $KOSASUPPORTSTINKERING $KOSASUPPORTSDIALECTS
- $KOSASUPPORTSWINDOWEDITING $KOSASUPPORTSRECORDING
- $KOSASUPPORTSAESENDING $KOSASUPPORTSAECOERCION $KOSASUPPORTSGETSOURCE
- $KOSASUPPORTSCOMPILING $ERROSARECORDINGISALREADYON
- $ERROSAINVALIDACCESS $ERROSABADSELECTOR $ERROSASCRIPTERROR
- $ERROSABADSTORAGETYPE $ERROSAINVALIDID $ERROSASYSTEMERROR
- $ERROSACORRUPTDATA $TYPEOSAGENERICSTORAGE $KOSASCRIPTRESOURCETYPE
- $KOSANULLSCRIPT $KOSAGENERICSCRIPTINGCOMPONENTSUBTYPE
- $KOSACOMPONENTTYPE))
- (provide-interface 'osa)
-